
*********************************************************		
* Replication file for Figures in Paper and Appendix: child level data
* Kosec, Katrina and Olga Shemyakina. 2022. “Child Health and Land Reform in Kyrgyzstan*
* Economic Development and Cultural Change 2022 *
	* Katrina Kosec, International Food Policy Research Institute, k.kosec@cgiar.org
	* Olga Shemyakina, School of Economics, Georgia Institute of Technology, olga.shemyakina@econ.gatech.edu
*********************************************************		

* Programs might need to install
	*ssc install estout  

* Programs to find and then install
	*findit outreg2


set more off

* data file*

	use "$root\EDCC_child_community.dta", clear

	
	
	*Figure 1: Exposure to land privatization by child age in years, over the four survey years*
	twoway scatter ov_exposed age_years if dm_urban==0, by(year, note("")) ytitle("Overall exposure, months") xtitle("Child age, years") xlabel(0(1)5) plotregion(fcolor(white)) graphregion(fcolor(white))
	graph save Graph "$out_folder\Figure 1.gph", replace
	
	*Figure 2: Height for age z-scores (HAZ)*
	twoway (kdensity hazall if dm_urban==0 & year==1993, legend(label(1 "1993")))  ///
			(kdensity hazall if (dm_urban==0 & year==1996), lpattern(dash) legend(label(2 "1996"))) ///
			(kdensity hazall if (dm_urban==0 & year==1997), lwidth(thick) lpattern(dash_dot) legend(label(3 "1997"))) ///
			(kdensity hazall if (dm_urban==0 & year==1998), lpattern(longdash) legend(label(4 "1998"))), ///
			xline(0) ///
		xtitle("Height for age z-scores") xlabel(-6(2)6) ///
		ytitle("kernel density, HAZ") ///
		legend(pos(1) ring(0) col(1)) legend(size(small)) ///
		title("")
		graph save Graph "$out_folder\Figure 2.gph", replace
		
	
	*Figure 3: Weight for age z-scores (WAZ)*
	twoway (kdensity waz06 if dm_urban==0 & year==1993, legend(label(1 "1993")))  ///
			(kdensity waz06 if (dm_urban==0 & year==1996), lpattern(dash) legend(label(2 "1996"))) ///
			(kdensity waz06 if (dm_urban==0 & year==1997), lwidth(thick) lpattern(dash_dot) legend(label(3 "1997"))) ///
			(kdensity waz06 if (dm_urban==0 & year==1998), lpattern(longdash) legend(label(4 "1998"))), ///
			xline(0) ///
		xtitle("Weight for age z-scores") xlabel(-6(2)6) ///
		ytitle("kernel density, WAZ") ///
		legend(pos(1) ring(0) col(1)) legend(size(small)) ///
		title("")
		graph save Graph "$out_folder\Figure 3.gph", replace
		
	
	*Figure 4: Weight for height z-scores (WHZ)*
	twoway (kdensity whz06 if dm_urban==0 & year==1993, legend(label(1 "1993")))  ///
			(kdensity whz06 if (dm_urban==0 & year==1996), lpattern(dash) legend(label(2 "1996"))) ///
			(kdensity whz06 if (dm_urban==0 & year==1997), lwidth(thick) lpattern(dash_dot) legend(label(3 "1997"))) ///
			(kdensity whz06 if (dm_urban==0 & year==1998), lpattern(longdash) legend(label(4 "1998"))), ///
			xline(0) ///
		xtitle("Weight for height z-scores") xlabel(-6(2)6) ///
		ytitle("kernel density, WHZ") ///
		legend(pos(1) ring(0) col(1)) legend(size(small)) ///
		title("")		
		graph save Graph "$out_folder\Figure 4.gph", replace
	
	*APPENDIX *
	
	*Figure A1: Exposure to land privatization by child age in years and oblast, over the four survey years*
	*a)
		
		*a)
	twoway scatter ov_exposed age_years if dm_urban==0 & year==1993, by(oblast, note("")) ///
		ytitle("Overall exposure, months") xtitle("Child age, years") xlabel(0(1)5) plotregion(fcolor(white)) graphregion(fcolor(white))
		graph save Graph "$out_folder\Figure A1 a.gph", replace

		*b)
	twoway scatter ov_exposed age_years if dm_urban==0 & year==1996, by(oblast, note("")) ///
		ytitle("Overall exposure, months") xtitle("Child age, years") xlabel(0(1)5) plotregion(fcolor(white)) graphregion(fcolor(white))
		graph save Graph "$out_folder\Figure A1 b.gph", replace
		
		*c)
	twoway scatter ov_exposed age_years if dm_urban==0 & year==1997, by(oblast, note("")) ///
		ytitle("Overall exposure, months") xtitle("Child age, years") xlabel(0(1)5) plotregion(fcolor(white)) graphregion(fcolor(white))		
		graph save Graph "$out_folder\Figure A1 c.gph", replace	
		*d)
	twoway scatter ov_exposed age_years if dm_urban==0 & year==1998, by(oblast, note("")) ///
		ytitle("Overall exposure, months") xtitle("Child age, years") xlabel(0(1)5) plotregion(fcolor(white)) graphregion(fcolor(white))			
		graph save Graph "$out_folder\Figure A1 d.gph", replace

